using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Mapping.Attributes;
using Lib;

namespace Persistance.Model
{
    [Serializable]
    [Class(Lazy = true)]
    public class Status
    {

        private int _statusID;
        //NHIBER: Setts the primary key to ID
        [Id(Name = "StatusID")]
        [Generator(1, Class = "native")]
        public virtual int StatusID
        {
            get { return _statusID; }
            set { _statusID = value; }
        }

        private string _statusName;
        [Property(Length = 50)]
        public virtual string StatusName
        {
            get { return _statusName; }
            set { _statusName = value; }
        }
    
        private Items _item;
        [ManyToOne(Column = "ItemID", Cascade = CascadeStyle.All, Unique = true)]
        public virtual Items Item
        {
            get { return _item; }
            set { _item = value; }
        }


    }
}
